package com.tdh.pojo;

import javax.persistence.*;
import java.io.Serializable;

@Entity
@Table(name = "t_user")
public class TUser implements Serializable {
    private String yhid;
    private String yhxm;
    private String yhkl;
    private String yhxb;
    private String yhbm;
    private String csrq;
    private String djsj;
    private String djrq;
    private String sfjy;
    private Integer pxh;

    @Id
    @Column(name = "YHID", nullable = false, length = 14)
    public String getYhid() {
        return yhid;
    }

    public void setYhid(String yhid) {
        this.yhid = yhid;
    }

    @Basic
    @Column(name = "YHXM", nullable = true, length = 40)
    public String getYhxm() {
        return yhxm;
    }

    public void setYhxm(String yhxm) {
        this.yhxm = yhxm;
    }

    @Basic
    @Column(name = "YHKL", nullable = true, length = 20)
    public String getYhkl() {
        return yhkl;
    }

    public void setYhkl(String yhkl) {
        this.yhkl = yhkl;
    }

    @Basic
    @Column(name = "YHXB", nullable = true, length = 20)
    public String getYhxb() {
        return yhxb;
    }

    public void setYhxb(String yhxb) {
        this.yhxb = yhxb;
    }

    @Basic
    @Column(name = "YHBM", nullable = true, length = 20)
    public String getYhbm() {
        return yhbm;
    }

    public void setYhbm(String yhbm) {
        this.yhbm = yhbm;
    }

    @Basic
    @Column(name = "CSRQ", nullable = true, length = 8)
    public String getCsrq() {
        return csrq;
    }

    public void setCsrq(String csrq) {
        this.csrq = csrq;
    }

    @Basic
    @Column(name = "DJSJ", nullable = true, length = 19)
    public String getDjsj() {
        return djsj;
    }

    public void setDjsj(String djsj) {
        this.djsj = djsj;
    }

    @Basic
    @Column(name = "DJRQ", nullable = true, length = 10)
    public String getDjrq() {
        return djrq;
    }

    public void setDjrq(String djrq) {
        this.djrq = djrq;
    }

    @Basic
    @Column(name = "SFJY", nullable = true, length = 1)
    public String getSfjy() {
        return sfjy;
    }

    public void setSfjy(String sfjy) {
        this.sfjy = sfjy;
    }

    @Basic
    @Column(name = "PXH", nullable = true)
    public Integer getPxh() {
        return pxh;
    }

    public void setPxh(Integer pxh) {
        this.pxh = pxh;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TUser tUser = (TUser) o;

        if (yhid != null ? !yhid.equals(tUser.yhid) : tUser.yhid != null) return false;
        if (yhxm != null ? !yhxm.equals(tUser.yhxm) : tUser.yhxm != null) return false;
        if (yhkl != null ? !yhkl.equals(tUser.yhkl) : tUser.yhkl != null) return false;
        if (yhxb != null ? !yhxb.equals(tUser.yhxb) : tUser.yhxb != null) return false;
        if (yhbm != null ? !yhbm.equals(tUser.yhbm) : tUser.yhbm != null) return false;
        if (csrq != null ? !csrq.equals(tUser.csrq) : tUser.csrq != null) return false;
        if (djsj != null ? !djsj.equals(tUser.djsj) : tUser.djsj != null) return false;
        if (djrq != null ? !djrq.equals(tUser.djrq) : tUser.djrq != null) return false;
        if (sfjy != null ? !sfjy.equals(tUser.sfjy) : tUser.sfjy != null) return false;
        if (pxh != null ? !pxh.equals(tUser.pxh) : tUser.pxh != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = yhid != null ? yhid.hashCode() : 0;
        result = 31 * result + (yhxm != null ? yhxm.hashCode() : 0);
        result = 31 * result + (yhkl != null ? yhkl.hashCode() : 0);
        result = 31 * result + (yhxb != null ? yhxb.hashCode() : 0);
        result = 31 * result + (yhbm != null ? yhbm.hashCode() : 0);
        result = 31 * result + (csrq != null ? csrq.hashCode() : 0);
        result = 31 * result + (djsj != null ? djsj.hashCode() : 0);
        result = 31 * result + (djrq != null ? djrq.hashCode() : 0);
        result = 31 * result + (sfjy != null ? sfjy.hashCode() : 0);
        result = 31 * result + (pxh != null ? pxh.hashCode() : 0);
        return result;
    }

    public TUser() {}

    public TUser(String yhid, String yhxm) {
        this.yhid = yhid;
        this.yhxm = yhxm;
    }

    public TUser(String yhid, String yhxm, String yhkl, String yhbm, String yhxb, String csrq, String sfjy, Integer pxh) {
        this.yhid = yhid;
        this.yhxm = yhxm;
        this.yhkl = yhkl;
        this.yhxb = yhxb;
        this.yhbm = yhbm;
        this.csrq = csrq;
        this.sfjy = sfjy;
        this.pxh = pxh;
    }
}
